package com.framework.workflow.em;

/**
 * @author zzg
 */
public enum ButtonEnum {
    SAVE( "save", "暂存"),
    SUBMIT("submit", "上报"),
    APPROVE("approve", "审批"),
    REJECT("reject", "驳回"),
    REVOKE("revoke", "收回"),
    SIGNATURE("signature", "签章");

    private final String code;
    private final String name;

    ButtonEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public String getValue() {
        return code;
    }

    public static ButtonEnum parseName(String name) {
        for (ButtonEnum it : ButtonEnum.values()) {
            if (it.getName().equals(name)){
                return it;
            }
        }
        return null;
    }
}
